﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Sunny.UI;

namespace TVBox源合并工具
{
    public partial class AddLiveForm : UIForm
    {
        public string name;

        #region 构造函数
        public AddLiveForm()
        {
            InitializeComponent();
        }
        public AddLiveForm(string name)
        {
            InitializeComponent();

            this.name = name;
        }
        #endregion

        #region 初始化
        private void UIAddSourceForm_Load(object sender, EventArgs e)
        {
            this.txtName.Text = name;
        }
        #endregion

        #region 确定按钮
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txtName.Text))
            {
                ShowWarningTip("请输入名称");
                return;
            }

            this.name = this.txtName.Text;

            this.DialogResult = DialogResult.OK;
        }
        #endregion

        #region 取消按钮
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
        #endregion
    }
}
